<%--
  Created by IntelliJ IDEA.
  User: ct
  Date: 2019/4/23
  Time: 17:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.util.Map" %>
<%@ page import="user.User" %>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>登录窗口</title>
</head>
<body>
<!-- CSS goes in the document HEAD or added to your external stylesheet -->
<style type="text/css">
    table.hovertable {
        font-family: verdana,arial,sans-serif;
        font-size:11px;
        color:#333333;
        border-width: 1px;
        border-color: #999999;
        border-collapse: collapse;
    }
    table.hovertable th {
        background-color:#c3dde0;
        border-width: 1px;
        padding: 8px;
        border-style: solid;
        border-color: #a9c6c9;
    }
    table.hovertable tr {
        background-color:#d4e3e5;
    }
    table.hovertable td {
        border-width: 1px;
        padding: 8px;
        border-style: solid;
        border-color: #a9c6c9;
    }
</style>


<div>
    <%
        User userName=(User)session.getAttribute("userName");

        if(userName == null) {
    %>
    <p>还未登录，请登录！！！</p>
    <button><a href="/login/dgut">登录</a></button>
    <%
    }else{
    %>
    <!-- Table goes in the document BODY -->
    <table class="hovertable">
        <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
            <th scope="col">DataName</th>
            <th scope="col">DataValue</th>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
            <th scope="col">username</th>
            <td><%=userName.getUsername()%></td>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
            <th scope="row">name</th>
            <td><%=userName.getName()%></td>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
            <th scope="col">group</th>
            <td><%=userName.getGroup()%></td>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
            <th scope="row">openid</th>
            <td><%=userName.getOpenid()%></td>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
            <th scope="row">wx_openid</th>
            <td><%=userName.getWx_openid()%></td>
        </tr>
    </table>
    <button><a href="/Servlet2">登出</a></button>
    <%
        }

    %>

</div>
</body>
</html>



